<script>
$(document).ready(function() {
    var navMenu = 
        ria.buildItem()
        .setDs(<?php echo json_encode($menu) ?>)
        .setElement($('#navMenu'))
        .setTpls({view:"<?php echo $navMenuTpl ?>"})
        .setViews({view:{tpl:'view'}})
        .display('view');
});
</script>
<div id='mainMenu'>
<span id='navMenu'></span><br/>
<?php if($name): ?>
<br/>
<?php echo $name; ?>
<?php endif; ?>
<?php if($projectName): ?>
 | 
<?php echo $projectName; ?>
<?php endif; ?>
</div>